package com.ruizhong.centercontroll.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruizhong.centercontroll.dao.T3DMeshMapper;
import com.ruizhong.centercontroll.entity.T3DMesh;
import com.ruizhong.centercontroll.entity.T3DScene;
import com.ruizhong.centercontroll.entity.TButton;
import com.ruizhong.centercontroll.service.T3DMeshService;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class T3DMeshServiceImpl extends ServiceImpl<T3DMeshMapper,T3DMesh> implements T3DMeshService {
    @Override
    public List<T3DMesh> get3DMeshsByPageId(Integer pageId, Boolean display) {
        List<T3DMesh> meshes = lambdaQuery()
                .eq(T3DMesh::getPageId, pageId)
                .list();
        return meshes;
    }

    @Override
    public void delete3DMeshByPageId(Integer pageId) {
        QueryWrapper<T3DMesh> deleteWrapper = new QueryWrapper<>();
        deleteWrapper.lambda().eq(T3DMesh::getPageId, pageId);
        remove(deleteWrapper);
    }
}
